<?php
    if(!$this->session->userdata('validated'))
    {
        echo form_open(base_url()."index.php/member/login/"); 
?>
        <input type="text" name="email" value="Email :" style="width: 160px;" onblur="if (this.value=='') this.value='Email :';" onfocus="if (this.value=='Email :') this.value='';"/>
        <span style="width: 9px;">&nbsp;</span>
        <input type="text" name="password" value="Password :" style="width: 160px;" onblur="if (this.value=='') { this.type='text'; this.value='Password :'; } " onfocus="if (this.value=='Password :') { this.type='password'; this.value=''; }"/>
        <span style="width: 9px;">&nbsp;</span>
        <input type="submit" class="login" value="Login" />
        <span>
            Not yet a member? <a href="<?php echo base_url(); ?>index.php/member/signup" class="link">Register for Free</a>
        </span> 
<?php 
        echo form_close();
    }
    else
    {
        ?>
        <strong>
<?php
            echo "Welcome \t" . $this->session->userdata('name') . " | ";
            echo anchor("/index.php/member/logout/", "Logout");
?>
        </strong>
<?php
    }
?>